package cn.iocoder.yudao.module.member.dal.mysql.siteconfiguration;

import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.member.dal.dataobject.level.MemberExperienceRecordDO;
import cn.iocoder.yudao.module.member.dal.dataobject.siteconfiguration.UserPoolConfigDo;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface UserPoolConfigMapper extends BaseMapperX<UserPoolConfigDo> {
    default void deleteBySiteCode(String code){
        delete(new LambdaQueryWrapper<UserPoolConfigDo>()
                .eq(UserPoolConfigDo::getSiteCode, code));
    }

    default UserPoolConfigDo getConfigByUserCode(String siteUserCode){
        return selectOne(new LambdaQueryWrapper<UserPoolConfigDo>()
                .eq(UserPoolConfigDo::getSiteUserCode, siteUserCode));
    }
}
